import Layout from '@/components/layout/Layout.vue'
import PageView from '@/components/PageView.vue'
import { shallowRef } from 'vue'
export const constRoutes = [
  {
    path: '/login',
    name: 'login',
    component: () => import('../views/LoginView.vue')
  },
  {
    path: '/403',
    name: '403',
    component: () => import('@/views/exception/404.vue')
  },
  {
    path: '/:catchAll(.*)',
    component: () => import('@/views/exception/404.vue')
  }
]

export const root = [
  {
    path: '/',
    name: '',
    redirect: '/dashboard',
    component: Layout,
    children: [
      {
        path: '/dashboard',
        name: 'dashboard',
        meta: { key: '9999' },
        component: () => import('@/views/home/index.vue')
      }
    ]
  }
]

export const constantRouterComponents = {
  Layout: shallowRef(Layout),
  PageView: shallowRef(PageView)
}
